<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no,email=no,adress=no"/>
<title>先花花</title>
<link rel="stylesheet" type="text/css" href="css/common.css" />
<script type="text/javascript" src="script/jquery.js"></script>
<!--图片切换-->
<script langue="javascript">
function show(popupdiv)
{
var Idiv=document.getElementById(popupdiv);
Idiv.style.display="block";
//以下部分使整个页面至灰不可点击
var procbg = document.createElement("div"); //首先创建一个div
procbg.setAttribute("id","mybg"); //定义该div的id
procbg.style.background = "#000000";
procbg.style.width = "100%";
procbg.style.height = "100%";
procbg.style.position = "fixed";
procbg.style.top = "0";
procbg.style.left = "0";
procbg.style.zIndex = "500";
procbg.style.opacity = "0.6";
procbg.style.filter = "Alpha(opacity=70)";
//以上部分也可以用csstext代替
// procbg.style.cssText="background:#000000;width:100%;height:100%;position:fixed;top:0;left:0;zIndex:500;opacity:0.6;filter:Alpha(opacity=70);";
//背景层加入页面
document.body.appendChild(procbg);
document.body.style.overflow = "auto"; //取消滚动条
//以下部分实现弹出层的拖拽效果
var posX;
var posY;
Idiv.onmousedown=function(e)
{
if(!e) e = window.event; //IE
posX = e.clientX - parseInt(Idiv.style.left);
posY = e.clientY - parseInt(Idiv.style.top);
document.onmousemove = mousemove;
}
document.onmouseup = function()
{
document.onmousemove = null;
}
function mousemove(ev)
{
if(ev==null) ev = window.event;//IE
Idiv.style.left = (ev.clientX - posX) + "px";
Idiv.style.top = (ev.clientY - posY) + "px";
}
}
function closeDiv(popupdiv) //关闭弹出层
{
var Idiv=document.getElementById(popupdiv);
Idiv.style.display="none";
document.body.style.overflow = "auto"; //恢复页面滚动条
var body = document.getElementsByTagName("body");
var mybg = document.getElementById("mybg");
body[0].removeChild(mybg);
}
</script>
</head>
<body>
<!-- 页面头部 -->
<section>
 <div class="navigation-bar"> <a href="javascript:history.back(-1)" class="z-01"></a> <span>注册</span> <a href="index.html" class="z-02"></a> </div>
</section>
<!-- 中间内容 -->
<div class="register">
  <div class="wrapper-reg">
    <div class="page-header"> <a href="/"> <img src="images/reg-logo.png"> </a> </div>
    <div class="page-main">
      <form id="registerForm" name="registerForm" method="post"  class="reg-form" enctype="application/x-www-form-urlencoded">
        <div class="m-field">
          <div class="iconphone"></div>
          <input id="mobileNumber" type="text" name="registerForm:mobileNumber" class="c-txt" maxlength="15"  placeholder="请输入手机号码">
          <p id="mobileNumberErrorDiv" class="validateNew"></p>
        </div>
        <!-- 密码 -->
        <div class="m-field" style="position: relative;">
          <div class="iconpwd"></div>

          <input id="pwdNumber" type="password" name="registerForm:mobileNumber" class="c-txt" maxlength="15"  placeholder="请输入密码">
          <span class="pwdviewoff" onClick="changePasswordShow(this)"></span>
          <p id="passwordErrorDiv" class="validateNew"></p>
        </div>        
       <!-- 确认密码 -->
        <div class="m-field" style="position: relative;">
          <div class="iconpwd"></div>

          <input id="qrpwdNumber" type="password" name="registerForm:mobileNumber" class="c-txt" maxlength="15"  placeholder="请确认密码">
          <span class="pwdviewoff" onClick="changePasswordShow(this)"></span>
          <p id="qrpasswordErrorDiv" class="validateNew"></p>
        </div>

        <div class="m-field m-yzm" id="imageCode" >
          <div class="m-code">
            <div class="iconyzm"></div>
            <input id="j_needauth" type="hidden" name="j_needauth" value="false">
            <input id="_spring_security_remember_me" type="hidden" name="_spring_security_remember_me" value="true">
            <input id="authCode" type="text" name="authCode" value="请输入验证码" class="c-txt c-code" maxlength="4"  placeholder="请输入验证码">
          </div>
          <span class="c-yzm"><img style="height: 100%;" id="captcha_img" onclick="refreshVerifr()" src="http://47.93.21.169/old/TP5/public/captcha.html"></span>
          <p id="j_yzmErrorDiv"></p>
        </div>
        <div class="m-field m-yzm">
          <div class="m-code">
            <div class="iconyzm"></div>
            <input id="realMobile" type="text" name="registerForm:authCode" class="c-txt c-code" maxlength="11" placeholder="请输入真实手机号码">
          </div>

          <span class="c-yzm c-hqyzm">获取验证码</span> <span id="sendCode" class="c-yzm c-hqyzm"><input type="button" class="hqyzm" style="background-color: pink" value="获取验证码"><input type="text" maxlength="4" size="4" placeholder="验证码" id="yzm"></span> <span id="sendCodeGrey" style="display:none;" class="c-yzm c-hqyzming"> <a href="javascript:void(0);" id="sendAuthCodeBtn1" class="hqyzmAfter" style="cursor:default;color: white;">免费获取校验码</a></span>
          <p id="authCodeErrorDiv" class="validateNew"></p>
        </div>
<!--         <div class="m-field" style="display:block;">
          <div class="iconyqm"></div>
          <input type="text" class="c-txt" style="color: rgb(195, 195, 195);" placeholder="分站/服务机构选择 (选填)"  id="allmm">
          <p id="referrerErrorDiv"></p>
        </div> -->
        <div class="agreement"> 我已阅读并同意阳光易贷的<a href="useragree.html" class="reg-xy">《隐私条款》</a>和 <a href="useragree1.html" class="reg-xy">《服务条款》</a> </div>
        <input id="submitButton" type="button" name="registerForm:submitButton" value="同意并继续" style="border:none;cursor:pointer;" class="btn-submit mt20" >
      </form>
      <div class="m-ljzc"> 已有账号　<a href="login.html">立即登录</a> </div>
    </div>
  </div>
</div>
<!--合作机构-->
<div id="allmenu" style="display:none;">
  <div class="pt45" style="margin-top: 0px;">
    <div class="cityadd" style="position:relative"> <i><img src="images/addr.png" width="100%"></i><a href="/nj.html">南京</a> <a href="javascript:void(0)" onClick="closeDiv('allmenu')" style=" position:absolute; right:5px; top:15px;"><img src="images/xxx.png" width="18" height="18"></a></div>
    <div class="clearfix cityabc">
      <div class="citywap">
        <p class="f14">热门城市</p>
        <div class="citycon clearfix"> <a href="#">南京</a> <a href="#">合肥</a> <a href="#">芜湖</a> <a href="#">昆明</a> <a href="#">苏州</a> <a href="#">杭州</a> <a href="#">无锡</a> <a href="#">西安</a> <a href="#">长春</a> <a href="#">沈阳</a> <a href="#">武汉</a> <a href="#">天津</a> <a href="#">石家庄</a> <a href="#">哈尔滨</a> </div>
      </div>
      <div class="clear"></div>
      <div class="p12 abc botl">
        <p class="f14">全部城市</p>
        <div class="orange cityabc"> <a class="ciabc" href="#A">A</a> <a class="ciabc" href="#B">B</a> <a class="ciabc" href="#C">C</a> <a class="ciabc" href="#D">D</a> <a class="ciabc" href="#E">E</a> <a class="ciabc" href="#F">F</a> <a class="ciabc" href="#G">G</a> <a class="ciabc" href="#H">H</a> <a class="ciabc" href="#J">J</a> <a class="ciabc" href="#K">K</a> <a class="ciabc" href="#L">L</a> <a class="ciabc" href="#M">M</a> <a class="ciabc" href="#N">N</a> <a class="ciabc" href="#Q">Q</a> <a class="ciabc" href="#S">S</a> <a class="ciabc" href="#T">T</a> <a class="ciabc" href="#W">W</a> <a class="ciabc" href="#X">X</a> <a class="ciabc" href="#Y">Y</a> <a class="ciabc" href="#Z">Z</a> </div>
      </div>
      <div class="citylist">
        <p class="bg_grey botl pre"><span id="A" class="citypo"></span> A</p>
        <div class="citysite clearfix"> <a href="#">安庆</a> <a>&nbsp;</a><a>&nbsp;</a><a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="B" class="citypo"></span> B</p>
        <div class="citysite clearfix"> <a href="#">蚌埠</a> <a href="#">保定</a> <a>&nbsp;</a><a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="C" class="citypo"></span> C</p>
        <div class="citysite clearfix"> <a href="#">长春</a> <a href="#">成都</a> <a href="#">潮州</a> <a href="#" style="background-image: none; background-position: initial initial; background-repeat: initial initial;">滁州</a> <a href="#">重庆</a> <a href="#">常熟</a> <a href="#">常州</a> <a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="D" class="citypo"></span> D</p>
        <div class="citysite clearfix"> <a href="#">大连</a> <a href="#">德州</a> <a>&nbsp;</a><a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="E" class="citypo"></span> E</p>
        <div class="citysite clearfix"> <a href="#">恩施</a> <a>&nbsp;</a><a>&nbsp;</a><a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="F" class="citypo"></span> F</p>
        <div class="citysite clearfix"> <a href="#">阜阳</a> <a>&nbsp;</a><a>&nbsp;</a><a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="G" class="citypo"></span> G</p>
        <div class="citysite clearfix"> <a href="#">高淳</a> <a>&nbsp;</a><a>&nbsp;</a><a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="H" class="citypo"></span> H</p>
        <div class="citysite clearfix"> <a href="#">淮北</a> <a href="#">淮南</a> <a href="#">邯郸</a> <a href="#" style="background-image: none; background-position: initial initial; background-repeat: initial initial;">合肥</a> <a href="#">黄山</a> <a href="#">哈尔滨</a> <a href="#">衡水</a> <a href="#" style="background-image: none; background-position: initial initial; background-repeat: initial initial;">淮安</a> <a href="#">杭州</a> <a>&nbsp;</a><a>&nbsp;</a><a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="J" class="citypo"></span> J</p>
        <div class="citysite clearfix"> <a href="#">金华</a> <a href="#">嘉兴</a> <a href="#">江阴</a> <a href="#" style="background-image: none; background-position: initial initial; background-repeat: initial initial;">晋中</a> </div>
        <p class="bg_grey botl pre"><span id="K" class="citypo"></span> K</p>
        <div class="citysite clearfix"> <a href="#">昆明</a> <a href="#">昆山</a> <a>&nbsp;</a><a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="L" class="citypo"></span> L</p>
        <div class="citysite clearfix"> <a href="#">六安</a> <a href="#">六合</a> <a href="#">溧水</a> <a href="#" style="background-image: none; background-position: initial initial; background-repeat: initial initial;">临沂</a> <a href="#">连云港</a> <a href="#">兰州</a> <a>&nbsp;</a><a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="M" class="citypo"></span> M</p>
        <div class="citysite clearfix"> <a href="#">马鞍山</a> <a>&nbsp;</a><a>&nbsp;</a><a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="N" class="citypo"></span> N</p>
        <div class="citysite clearfix"> <a href="#">宁波</a> <a href="#">南京</a> <a href="#">南通</a> <a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="Q" class="citypo"></span> Q</p>
        <div class="citysite clearfix"> <a href="#">青岛</a> <a href="#">泉州</a> <a>&nbsp;</a><a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="S" class="citypo"></span> S</p>
        <div class="citysite clearfix"> <a href="#">上海</a> <a href="#">石家庄</a> <a href="#">宿迁</a> <a href="#" style="background-image: none; background-position: initial initial; background-repeat: initial initial;">汕头</a> <a href="#">宿州</a> <a href="#">绍兴</a> <a href="#">沈阳</a> <a href="#" style="background-image: none; background-position: initial initial; background-repeat: initial initial;">苏州</a> </div>
        <p class="bg_grey botl pre"><span id="T" class="citypo"></span> T</p>
        <div class="citysite clearfix"> <a href="#">天津</a> <a href="#">太原</a> <a href="#">泰州</a> <a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
        <p class="bg_grey botl pre"><span id="W" class="citypo"></span> W</p>
        <div class="citysite clearfix"> <a href="#">芜湖</a> <a href="#">武汉</a> <a href="#">无锡</a> <a href="#" style="background-image: none; background-position: initial initial; background-repeat: initial initial;">温州</a> </div>
        <p class="bg_grey botl pre"><span id="X" class="citypo"></span> X</p>
        <div class="citysite clearfix"> <a href="#">西安</a> <a href="#">邢台</a> <a href="#">新乡</a> <a href="#" style="background-image: none; background-position: initial initial; background-repeat: initial initial;">徐州</a> </div>
        <p class="bg_grey botl pre"><span id="Y" class="citypo"></span> Y</p>
        <div class="citysite clearfix"> <a href="#">盐城</a> <a href="#">烟台</a> <a href="#">宜兴</a> <a href="#" style="background-image: none; background-position: initial initial; background-repeat: initial initial;">扬州</a> </div>
        <p class="bg_grey botl pre"><span id="Z" class="citypo"></span> Z</p>
        <div class="citysite clearfix"> <a href="#">漳州</a> <a href="#">珠海</a> <a href="#">株洲</a> <a href="#" style="background-image: none; background-position: initial initial; background-repeat: initial initial;">镇江</a> <a href="#">中山</a> <a href="#">遵义</a> <a href="#">郑州</a> <a style="background-image: none; background-position: initial initial; background-repeat: initial initial;">&nbsp;</a></div>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript" src="script/jquery.md5.js"></script>
<script type="text/javascript" src="script/register.js"></script>
<script type="text/javascript">
$("#allmm").bind("click",function(){
	if($("#allmenu").css("display")=="none"){
		$("#allmenu").slideDown(300);
	}else{
		$("#allmenu").slideUp(200);
	}
});
</script>
<script type="text/javascript">
		//<![CDATA[
			
			//验证所有信息
			function checkAll(){
				var refferValue=""!="";
				var mobileNumberFlag=checkMobilenumber();
				var authCodeFlag=checkAuthCode();
				var passwordFlag=checkPassword();
				if(refferValue)
				{
					referrerFlag=true;
				}
				else
				{
					var referrerFlag=checkReferrer();
				}
				var allFlag=mobileNumberFlag&&authCodeFlag&&passwordFlag&&referrerFlag;
				if(!(allFlag)){
					return false;
				}
				return true;
			}
			
		var flag = false;
		//验证码发送消息提示
		function sCode(xhr, status, args) {
			if (!args.validationFailed) {
				$("#sendCode").hide();
				$("#sendCodeGrey").show();
				if(flag && $("#sendCode").is(":hidden")){
					return;
				}
				flag = true;
				timer("sendAuthCodeBtn1", {
					"count" : 60,
					"animate" : true,
					initTextBefore : "重新获取",
					initTextAfter : "秒",
					callback:function(){
						$("#sendCode").show();
						$("#sendCodeGrey").hide();
						flag = false;
					}
				}).begin();
			}
		}
		function checkMobilenumber()
		{
			var mobileNumber = $("#registerForm\\:mobileNumber").val();
			nullMobileNumberFlag=mobileNumber==""||mobileNumber=="请输入真实手机号码";
			if(nullMobileNumberFlag)
			{
				$("#mobileNumberErrorDiv").empty();
				$("#mobileNumberErrorDiv").append("请输入真实手机号码");
				return false;
			}
			else
			{
				$("#mobileNumberErrorDiv").empty();
			}
			return true;
		}
		
		function checkAuthCode()
		{
			var authCode=$("#registerForm\\:authCode").val();
			nullAuthCodeFlag=authCode==""||authCode=="请输入验证码";
			if(nullAuthCodeFlag)
			{
				$("#authCodeErrorDiv").empty();
				$("#authCodeErrorDiv").append("请输入验证码");
				return false;
			}
			else
			{
				$("#authCodeErrorDiv").empty();
			}
			return true;
		}
		
		
		function checkPassword()
		{
			var password=$("#registerForm\\:password").val();
			nullpasswordFlag=password==""||password=="请输入密码";
			if(nullpasswordFlag)
			{
				$("#passwordErrorDiv").empty();
				$("#passwordErrorDiv").append("请输入密码");
				return false;
			}
			else
			{
				$("#passwordErrorDiv").empty();
			}
			return true;
		}
		
		/** 邀请码验证规则 */
		function checkReferrer(){
			
			var referrer=$("#registerForm\\:referrer").val();
			if(referrer!=""&&referrer!="请输入邀请码 (选填)"){
				var referrerRegex="^[0-9]{4}$";
				var referrerPattern=new RegExp(referrerRegex);
				var referrerFlag=referrerPattern.test(referrer);
				if(!referrerFlag){
					$("#referrerErrorDiv").empty();
					$("#referrerErrorDiv").append("请输入4位纯数字");
					return false;
				}else{
					$("#referrerErrorDiv").empty();
				}
			}
			else
			{
				$("#referrerErrorDiv").empty();
			}
			return true;
		}
		
		//]]>
		</script>
<script type="text/javascript"> 
    //<![CDATA[
		 if(""==$("#registerForm\\:referrer").val()){
				$("#registerForm\\:referrer").val("请输入邀请码 (选填)");
	 		$("#registerForm\\:referrer").css("color","#c3c3c3");
		 }
		 $("#registerForm\\:password").focusout(function(){
			 	if($("#registerForm\\:password").val() == ""){
			 		$("#registerForm\\:password2").css("display", "");
			 		$("#registerForm\\:password").css("display", "none");
			 		$("#registerForm\\:password2").val("请输入密码");
			 	}
		});
		function changePasswordShow(element)
		{
			var hasFlag=$(element).hasClass('pwdview');
			if(hasFlag)
			{
				$(element).removeClass('pwdview');
				$(element).addClass('pwdviewoff');
				passwordShowFlag=false;
				$("#registerForm\\:password").attr('type','password');
			}
			else
			{
				$(element).removeClass('pwdviewoff');
				$(element).addClass('pwdview');
				passwordShowFlag=true;
				$("#registerForm\\:password").attr('type','text');
			}
		}
		if(""==$("#registerForm\\:password").val()){
				$("#registerForm\\:password").val("请输入密码");
	 		$("#registerForm\\:password").css("color","#c3c3c3");
		}
		 
	    $("#registerForm\\:password2").focusin(function(){
	       	 if($("#registerForm\\:password").val()=="请输入密码"){
	       		 $("#registerForm\\:password").val("");
	       	 }
	        	$("#registerForm\\:password2").css("display", "none");
	        	$("#registerForm\\:password").css("display", "");
	        	$("#registerForm\\:password").css("color","#4a4a4a");
	        	$("#registerForm\\:password").focus().click();
	     });
		 $("#registerForm\\:referrer").focusin(function(){
		 	if($("#registerForm\\:referrer").val() == "请输入邀请码 (选填)") {
			 	$("#registerForm\\:referrer").val("");
			 	$("#registerForm\\:referrer").css("color","#4a4a4a");
		   	 	}
		 }).focusout(function(){
		 	if($("#registerForm\\:referrer").val() == ""){
			 	$("#registerForm\\:referrer").val("请输入邀请码 (选填)").css("color", "#c3c3c3");
		 	}else{
		 		$("#registerForm\\:referrer").css("color","#4a4a4a");
		 	}
		 });
		 $("#registerForm\\:authCode").focusin(function(){
			 	if($("#registerForm\\:authCode").val() == "请输入验证码") {
			 		$("#registerForm\\:authCode").val("");
			 		$("#registerForm\\:authCode").css("color","#4a4a4a");
			 	}
			 }).focusout(function(){
			 	if($("#registerForm\\:authCode").val() == "" ||$("#registerForm\\:authCode").val() == "请输入验证码") {
			 		$("#registerForm\\:authCode").val("请输入验证码").css("color", "#A6A6A6");
			 	}else{
			 		$("#registerForm\\:authCode").css("color","#4a4a4a");
			 	}
			 });
			 $("#registerForm\\:mobileNumber").focusin(function(){
			 	if($("#registerForm\\:mobileNumber").val() == "请输入真实手机号码") {
			 		$("#registerForm\\:mobileNumber").val("");
			 		$("#registerForm\\:mobileNumber").css("color","#4a4a4a");
			 	}
			 }).focusout(function(){
			 	if($("#registerForm\\:mobileNumber").val() == "" ||$("#registerForm\\:mobileNumber").val() == "请输入真实手机号码") {
			 		$("#registerForm\\:mobileNumber").val("请输入真实手机号码").css("color", "#A6A6A6");
			 	}else{
			 		$("#registerForm\\:mobileNumber").css("color","#4a4a4a");
			 	}
			 });
			 var second = 0;
		     var internal;
			 function checkSendCode()
			 {
					$("#mobileNumberErrorDiv").empty();
					var mobileNumber = $("#registerForm\\:mobileNumber").val();
					var mobileRegex="^1[3|4|5|7|8][0-9]{9}$";
					var usernamePattern=new RegExp(mobileRegex);
					var usernameFlag=usernamePattern.test(mobileNumber);
					if(!usernameFlag){
						$("#mobileNumberErrorDiv").append("请输入真实手机号码");
						return false;
					}

					var returnResult = false;
					$.ajax({
						   url: "/valiSms",
						   async:false,
						   data:{
								mobileNumber:mobileNumber
						   },
						   success: function(data){
							   if(data.flag == 'NO'){
								   $("#mobileNumberErrorDiv").html("点击过于频繁,请<b>"+data.second+"</b>秒后重试");
								   second = data.second;
								   clearInterval(internal);
								   internal = setInterval(function(){
		                              if(second == 0){
		                            	  $("#mobileNumberErrorDiv").html('');
		                              }else{
		                            	  second = second -1;
		                            	  $("#mobileNumberErrorDiv").find('b').html(second);
		                              }
								   },1000);
								   returnResult = false;
							   }else if(data.flag == 'NO1'){
								   $("#mobileNumberErrorDiv").html(data.smsVali);
								   returnResult = false;
							   }else{
								   returnResult = true;
							   }
						   }
					    });
					
					return returnResult;
			}

	     $(document).ready(function(){
               $("#javax_faces_developmentstage_messages").remove();
               
		     }); 
		//]]>
	</script>
<script type="text/javascript" src="script/jsf.js.htm"></script>
</body>
</html>
